package net.xi.dmhome.mapper;

import net.xi.dmhome.entity.Answer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import javax.websocket.server.PathParam;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jxhu
 * @since 2021-02-02
 */
@Repository
public interface AnswerMapper extends BaseMapper<Answer> {

    @Select("select * from dm_answer where questionid = #{qid} and isdel = 0")
    List<Answer> selectByQId(@PathParam("qid") Integer id);

    @Select("select * from dm_answer where userid = #{uuid} and isdel = 0")
    List<Answer> selectByuserId(@PathParam("uuid") String uuid);
}
